home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / text / misc / port / string / strend.s < prev    next >
Encoding:
Text File  |  1996-09-07  |  235 b   |  21 lines

  1.  
  2.     XDEF    StrEnd
  3.  
  4. ; Args:
  5. ; A0 = Pointer to a string.
  6.  
  7. ; Returns:
  8. ; A0 = Pointer to the null end byte.
  9. ; D0 = Length of the string.
  10.     
  11. StrEnd:
  12.     move.l    a0,d0
  13.  
  14. .StrEnd1:
  15.     tst.b    (a0)+
  16.     bne.b    .StrEnd1
  17.     subq.l    #1,a0
  18.     sub.l    a0,d0
  19.     neg.l    d0
  20.     rts
  21.